<%--

  Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the latest version of the GNU Lesser General
  Public License as published by the Free Software Foundation;

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program (LICENSE.txt); if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

--%>
<%@ page
    errorPage="/WEB-INF/jsp/error.jsp"
    contentType="text/html; charset=utf-8"
%>
<script type="text/javascript">
<!--
  	function add(){
	//var line=event.srcElement.parentElement.rowIndex;
	//var num=document.all.table.rows[line];
	var totalline=document.all.table.rows.length;
	//hao=num.cells[0].innerText;
	//var xuhao=parseFloat(hao);
	//var newTR = num.cloneNode(true);
	//newTR.id="tr";
	//num.insertAdjacentElement("afterEnd",newTR);
	
	var kkk=1;
	for(var ii=0;ii<totalline;ii++){//从第一行开始循环到最后一行
	   var ddd=document.all.table.rows[ii].id;//取得每一行TR的id值
	   if(ddd=="tr"){//如果id值为"tr"，则可判断该行有文本框
	   document.all.table.rows[ii].cells[0].innerText=kkk;//把该行第一个单元格中显示的内容设置为kkk
	   kkk=kkk+1;//kkk+1
	   }
	}
   }
  window.onload=function(){
   add();
  }
//-->
</script>

<%@ include file="page-init.jsp" %>

<div class="message"><f:message key="common.caption.view" />: <jamwiki:pagination total="${itemCount}" rootUrl="${rootUrl}" /></div>

  <table id="table" width="90%" border="0" cellpadding="0" cellspacing="1" bgcolor="#e9e9e9">
      <tr>
        <td width="8%" height="35" align="center" class="td_main" style="border-right: solid 1px #ffffff;">序号</td>
        <td width="80%" align="center" class="td_main" style="border-right: solid 1px #ffffff;">主题名称</td>
       
      </tr>
      <ol start="<c:out value="${offset + 1}" />">
		<c:forEach items="${items}" var="item">
		<tr id="tr"  onClick="add()">
        <td width="8%" height="35" align="center" bgcolor="#FFFFFF" class="td_x">1</td>
        <td align="left" bgcolor="#FFFFFF" class="td_x" style="padding-left:30px;"><jamwiki:linkImage value="${item}" text="${item}" /></td>
        
        </tr>
	  </c:forEach>
	  </ol>
    </table>
